<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <title>OpenStreetMapLayer | Sample | ArcGIS API for JavaScript 4.17</title>

    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    </style>

    <link
      rel="stylesheet"
      href="https://js.arcgis.com/4.17/esri/themes/light/main.css"
    />
    <script src="https://js.arcgis.com/4.17/"></script>

    <script>
      require([
        "esri/layers/OpenStreetMapLayer",
        "esri/Map",
        "esri/views/SceneView"
      ], function (OpenStreetMapLayer, Map, SceneView) {
        var map = new Map({
          ground: "world-elevation"
        });

        var view = new SceneView({
          map: map,
          container: "viewDiv"
        });

        var osmLayer = new OpenStreetMapLayer();
        map.add(osmLayer);
      });
    </script>
  </head>

  <body>
    <div id="viewDiv"></div>
  </body>
</html>
